﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Water.Architecture2.EntityXML
{
    internal enum GeneratorType
    {
        None,
        Assigned, 
        Indentity, 
        Sequence
    }

    internal class GeneratorTypeConvert
    {
        internal static GeneratorType ToGeneratorType(String generatorType)
        {
            GeneratorType gt;
            switch (generatorType.ToLower())
            { 
                case "none":
                    gt= GeneratorType.None;
                    break;
                case "assigned":
                    gt = GeneratorType.Assigned;
                    break;
                case "indentity":
                    gt = GeneratorType.Indentity;
                    break;
                case "sequence":
                    gt = GeneratorType.Sequence;
                    break;
                default:
                    gt = GeneratorType.None;
                    break;
            }
            return gt;
        }
    }
}
